AWSS3GetObject
Type
command
Summary
Get an object
Syntax
AWSS3GetObject <pBucket>,<pObject>,<pParameters>,<pFile>,<pCallback>
Description
The caller of this command will be sent the callback message on completion with two parameters:
- the request ID
- the object data if the pFile parameter was empty.
- an error message if one occurred
note
The message is sent before the tsNet connection is closed so it is possible to access the recieved headers using the tsNetRetrHeaders function
For futher details about this API see the AWS S3 REST API Documentation
Parameters
Name | Type | Description |
---|---|---|
pBucket | The name of a bucket | |
pObject | The name (key) of the object | |
pParameters | An array containing parameters to include in the request:
| |
pFile | A file path to save the downloaded object directly to. Using this option will avoid having the entire object loaded into memory locally. | |
pCallback | A command name to be sent on completion with the server reponse. |
Examples
AWSS3GetObject "mybucket", "myobject", , "getObjectCallback"
put it into tRequestID
on getObjectCallback pRequestID, pResult, pError
if pError is empty then
put pResult into url "binfile:myfile.dat"
end if
end getObjectCallback
Related
function: tsNetGetStatus, tsNetRetrHeaders
library: tsNet